package com.appbase.custom.base;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Describe:
 * Created by Rance Rang on 2019-10-24.
 * <p>
 * Copyright (c) Tange.Inc All rights reserved.
 */
public class DrivePostion implements Parcelable {
    public long getTime() {
        return time;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public double getLatitude() {
        return latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public double getSpeed() {
        return speed;
    }

    private long time;
    private  double latitude;
    private  double longitude;
    private double speed;

    public String getGps_signal() {
        return gps_signal;
    }

    private String gps_signal;

    public int getDirection() {
        return direction;
    }

    private int direction;

    public DrivePostion() {
    }

    protected DrivePostion(Parcel in) {
        time = in.readLong();
        latitude = in.readDouble();
        longitude = in.readDouble();
        speed = in.readDouble();
        direction = in.readInt();
        gps_signal = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(time);
        dest.writeDouble(latitude);
        dest.writeDouble(longitude);
        dest.writeDouble(speed);
        dest.writeInt(direction);
        dest.writeString(gps_signal);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DrivePostion> CREATOR = new Creator<DrivePostion>() {
        @Override
        public DrivePostion createFromParcel(Parcel in) {
            return new DrivePostion(in);
        }

        @Override
        public DrivePostion[] newArray(int size) {
            return new DrivePostion[size];
        }
    };
}
